clear all
version 11
set more off

cd ~\20_emission_county_level

insheet using emission_county_level_1990.csv, names comma clear

gen str3 c_fips = string(county_fips,"%03.0f")
gen str3 s_fips = string(state_fips,"%02.0f")
gen fips_string = s_fips+c_fips

destring fips_string, generate(fips)

tab tier_1 // no tier_1 ==  13

collapse (sum) co_p-pm25_a, by(fips)

local pollutant "co nox voc so2 nh3 pm10 pm25"
foreach pol of local pollutant {
	gen `pol' = `pol'_a + `pol'_p
}

keep fips nox-pm25
tabstat pm25, stat(sum) // verified

compress
saveold emission_county_level_1990, replace

